﻿@using EcBlog.Data
@using EcBlog.Extensions
@using EcBlog.Models
@model PostHeaderViewModel
@{
    var siteSettings = DependencyResolver.Current.GetService<IEcUnitOfWork>().SiteSettingRepository;  
}
<header>
   <h2>
       <a href="@Url.GetSlugUrl(Model.Page.Published, Model.Page.Slug)">@Model.Page.Title</a></h2>
   <div class="importantContainer">
       <div class="rigthItem">
           @Model.Page.Published.ToString(siteSettings[SiteSettingKey.DateFormat] + " " + siteSettings[SiteSettingKey.TimeFormat])
           @foreach (var item in Model.Page.Tags)
           {
               @:|<a href="@Url.GetTagSlugUrl(item.TagSlug)">@(item.TagName)</a>
           }
           |
       </div>
   </div>
</header>